#pragma once
#include <stdint.h>
#include <string>
#include <map>
#include <functional>

#include "message_def.h"

static const uint32_t kIntLen = 4;                            // sizeof(int) is 4
static const uint32_t kTotalHeadLen = 16;                     // head of TcpMessage is 4*4
static const uint32_t kMaxBodySize = 1024 * 10;               // Max TcpMessage body size 
static const uint32_t kMaxMessageSize = 1024 * 1024 * 64;     // Max TcpMessage size

static const char* kMsgStart = "handleStart";                // first thing todo when connected
static const char* kMsgLoginReq = "sendLoginReg";            // send login_reg
static const char* kMsgHeartbeatReq = "sendHeartbeatReq";    // send heartbeat_req 
static const char* kMsgReadHeader = "handleReadHeader";        // MessageBus register topic for sending read header to messagehandler module
static const char* kMsgReadBody = "handleReadBody";            // essageBus register topic for sending read body to messagehandler module

static const int kMaxLocaltimeLen = 128;

struct ClientConfig_t
{
    bool isReconnect = false;
    int reconnectInterval = 5;
    int heartbeatInterval = 10;
    std::string serverIP;
    std::string serverPort;
};

struct ServerConfig_t
{
    int heartbeatInterval = 10; 
    int serverPort = 6666;
};



